import React, { forwardRef } from 'react';
import { Radio } from 'antd';
import styles from './index.less';

const { Group: RadioGroup, Button: RadioButton } = Radio;

const TimeType = forwardRef((props, ref) => {
  const { value, onChange } = props;
  return (
    <div className={styles.date}>
      <RadioGroup value={value} ref={ref} onChange={onChange}>
        <RadioButton key="orderCreation" value="orderCreation">
          创建订单时间
        </RadioButton>
        <RadioButton key="waybillApplication" value="waybillApplication">
          获取单号时间
        </RadioButton>
      </RadioGroup>
    </div>
  );
});

export default TimeType;
